package com.ruoyi.sl.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.ruoyi.sl.domain.SlDeduction;
import org.apache.ibatis.annotations.Param;

/**
 * 扣款相关人Mapper接口
 * 
 * @author admin
 * @date 2024-06-27
 */
public interface SlDeductionMapper 
{
    /**
     * 查询扣款相关人
     * 
     * @param deductionId 扣款相关人主键
     * @return 扣款相关人
     */
    public SlDeduction selectSlDeductionByDeductionId(Long deductionId);

    /**
     * 查询扣款相关人列表
     * 
     * @param slDeduction 扣款相关人
     * @return 扣款相关人集合
     */
    public List<SlDeduction> selectSlDeductionList(SlDeduction slDeduction);

    //查询报工项指定人的扣款金额
    public BigDecimal selectDmAmountByRworkAndUser(@Param("rfworkId") Long rfworkId,@Param("rworkId") Long rworkId,@Param("memberUser") String memberUser);

    /**
     * 新增扣款相关人
     * 
     * @param slDeduction 扣款相关人
     * @return 结果
     */
    public int insertSlDeduction(SlDeduction slDeduction);

    /**
     * 修改扣款相关人
     * 
     * @param slDeduction 扣款相关人
     * @return 结果
     */
    public int updateSlDeduction(SlDeduction slDeduction);

    /**
     * 删除扣款相关人
     * 
     * @param deductionId 扣款相关人主键
     * @return 结果
     */
    public int deleteSlDeductionByDeductionId(Long deductionId);

    /**
     * 批量删除扣款相关人
     * 
     * @param deductionIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSlDeductionByDeductionIds(Long[] deductionIds);
}
